from matplotlib import pyplot as plt

expenditures = {
    "学习用品": 1,
    "日常用品": 2,
    "伙食费": 3,
    "通讯费": 4,
    "娱乐费": 5,
    "其他开支": 6
}

items = expenditures.items()

plt.pie([v for _, v in items], labels=[k for k, _ in items])

plt.rcParams['font.sans-serif'] = ['SimHei']
plt.rcParams['axes.unicode_minus'] = False
plt.show()
